package cn.edu.cqvie.jdk8.stream;

import java.util.stream.IntStream;

public class StreamTest8 {

    public static void main(String[] args) {

        //无限等待的流
        //IntStream.iterate(0, i -> (i + 1) % 2).distinct().limit(6)

        //流的顺序
        IntStream.iterate(0, i -> (i + 1) % 2).limit(6).distinct().forEach(System.out::println);
    }
}
